const [first, ...rest] = [1,2,3,4,5];
console.log(first); // 1
console.log(rest); // [2,3,4,5]
//


function sum(first, ...args) {
    console.log("🚀 ~ sum ~ first:", first) // first: 1
    return args.reduce((acc, curr) => acc + curr, 0); // 14
}   
console.log(sum(1, 2, 3, 4, 5)); //